<?php
namespace app\common\customer\validate;

use think\Validate;
class UploadFileValidate extends Validate
{

    protected $rule = [
        'city_id' => ['require', 'gt:0'],
        'source_id' => ['require', 'gt:0'],
        'name' => ['require'],
        'path' => ['require'],
        'dir_path' => ['require'],
        'size' => ['require', 'gt:0'],
        'extname' => ['require'],
        'type' => ['require'],
        'hash' => ['require']
    ];

    protected $message = [
        'city_id.require' => '城市必填',
        'city_id.gt' => '城市必填',
        'source_id.require' => '渠道必填',
        'source_id.gt' => '渠道必填',
        'name.require' => '文件名必填',
        'path.require' => '文件路径必填',
        'dir_path.require' => '文件夹路径必填',
        'size.require' => '文件大小必填',
        'size.gt' => '文件大小必填',
        'extname.require' => '文件后缀必填',
        'type.require' => '文件类型必填',
        'hash.require' => '文件hash必填'
    ];
}